import librosa
from espnet_onnx import Speech2Text

model_dir = "/public/ai_platform/models/cmcc_2022/conformer_2048/full"
asr = Speech2Text(model_dir=model_dir)


wav_file = "/home/gyf/pkg/conformer_new/asr_conformer/speech_recognition/wav/BAC009S0764W0121.wav"
y, sr = librosa.load(wav_file, sr=16000)
nbest = speech2text(y)
print(nbest)